<?php 
$companyid=$session->read("companyid");
$user=$session->read('User');
$userid=base64_encode($user["id"]);
$cid=base64_encode($companyid);
?>
<?php echo $html->css('kindeditor/');?>
<?php echo $javascript->link('kindeditor/kindeditor.js');?>
<?php echo $javascript->link('kindeditor/lang/zh_CN.js');?>
<?php echo $javascript->link('kindeditor/plugins/code/prettify.js');?>
<script>
KindEditor.ready(function(K) {
<?php 
echo $fck->load('CompPage.info');
echo $fck->load('CompPage.profile');
echo $fck->load('CompPage.prospect');
echo $fck->load('CompPage.techadvant');
echo $fck->load('CompPage.patent');
echo $fck->load('CompPage.teachandstudy');
echo $fck->load('CompPage.propaganda');
echo $fck->load('CompPage.firstinfo');
echo $fck->load('CompPage.secondinfo');
echo $fck->load('CompPage.thirdinfo');
echo $fck->load('CompPage.fourthinfo');

?>
prettyPrint();
});
function drop_up_down(slide_btn) {
	//$(slide_btn).parent().parent().next().slideToggle("fast");
	var infodisplay=$(slide_btn).parent().parent().next().attr("style");
	if(infodisplay==null){
		$(slide_btn).parent().parent().next().attr("style","display:none");
		$(slide_btn).parent().parent().next().next().attr("style","display:block");
		$(slide_btn).parent().next().attr("style","display:none");
	}else if(infodisplay.indexOf("block")>-1){
		$(slide_btn).parent().parent().next().attr("style","display:none");
		$(slide_btn).parent().parent().next().next().attr("style","display:block");
		$(slide_btn).parent().next().attr("style","display:none");
	}else{
		$(slide_btn).parent().parent().next().attr("style","display:block");
		$(slide_btn).parent().parent().next().next().attr("style","display:none");
		$(slide_btn).parent().next().attr("style","display:block");
	}
	
	$(slide_btn).toggleClass("active");
	if($(slide_btn).text()=="取消编辑") {
		$(slide_btn).text("编辑");
	} else {
		$(slide_btn).text("取消编辑");
	}
}
</script>
<?php echo $form -> create('pages', array('url' => '/companys/editpage/edit','type'=> 'post','name'=>'webpage') ); ?>	
<div class="right_side_operate_area">
	<div class="right_side_title left">
		<h2>
		<?php 
		$companyname=$session->read("companyname");
		echo $html->link($companyname,"/companys/showinfosummary/".$companyid);
		?>
		</h2>
	</div>
	<!--<div class="right back_btn">
			<?php 
//            	$urlpath=$accp->path."/loginsys?id=".$userid."&action=".base64_encode("company").'&cid='.$cid;
//            	echo '<a target="_blank" href="'.$urlpath.'">预览</a>';
            ?>
	</div>
    --><div class="right back_btn users_form">
        <?php  echo $form->hidden('CompPage.id'); ?>
    </div>
    <div class="clear"></div>
</div>
<div class="right_side_scollbar">
    <div class="detail_info_panel">
    	<style>
    		.corp_info_panel img{
    			max-width:680px;
    		}
    	</style>
    	<div class="corp_info_panel" style="width:80%">
	    	<div class="category_file_block">
		 		<div class="category_title">
		 			<div class="left">产品服务与应用领域</div>
		 			<div class="right title_drop_u_d" style="visibility:visible">
		 				<a href="javascript:void(0);" onclick="drop_up_down(this)">编辑</a>
		 			</div>
		 			<div class="right users_form" style="display:none;">
		 				<input type="submit" value="保存"/>
		 			</div>
		 			<div class="clear"></div>
		 		</div>
		 		<div class="file_list_panel file_list_edit_panel" style="display:none;">
			 		<?php
			 			echo $form->textarea('CompPage.info',array('style'=>'width:100%;height:300px;visibility:hidden;','name'=>'info'));
			 		?>
		 		</div>
		 		<div class="file_list_panel">
		 			<?php echo $str->setinfo($form->value('CompPage.info')) ?>
		 		</div>
		 	</div>
		 	
		 	<!--  
		 	<div class="category_file_block">
		 		<div class="category_title">
		 			<div class="left">发展概况</div>
		 			<div class="right title_drop_u_d">
		 				<a href="javascript:void(0);" onclick="drop_up_down(this)">编辑</a>
		 			</div>
		 			<div class="right users_form" style="display:none;">
		 				<input type="submit" value="保存"/>
		 			</div>
		 			<div class="clear"></div>
		 		</div>
		 		<div class="file_list_panel file_list_edit_panel" style="display:none;">
			 		<?php
			 			echo $form->textarea('CompPage.profile',array('style'=>'width:100%;height:300px;visibility:hidden;','name'=>'profile'));
			 		?>
		 		</div>
		 		<div class="file_list_panel">
		 			<?php echo $str->setinfo($form->value('CompPage.profile')); ?>
		 		</div>
		 	</div>
		 	<div class="category_file_block">
		 		<div class="category_title">
		 			<div class="left">发展前景</div>
		 			<div class="right title_drop_u_d">
		 				<a href="javascript:void(0);" onclick="drop_up_down(this)">编辑</a>
		 			</div>
		 			<div class="right users_form" style="display:none;">
		 				<input type="submit" value="保存"/>
		 			</div>
		 			<div class="clear"></div>
		 		</div>
		 		<div class="file_list_panel file_list_edit_panel" style="display:none;">
			 		<?php
			 			echo $form->textarea('CompPage.prospect',array('style'=>'width:100%;height:300px;visibility:hidden;','name'=>'prospect'));
			 		?>
		 		</div>
		 		<div class="file_list_panel">
		 			<?php echo $str->setinfo($form->value('CompPage.prospect')); ?>
		 		</div>
		 	</div>
		 	<div class="category_file_block">
		 		<div class="category_title">
		 			<div class="left">技术优势</div>
		 			<div class="right title_drop_u_d">
		 				<a href="javascript:void(0);" onclick="drop_up_down(this)">编辑</a>
		 			</div>
		 			<div class="right users_form" style="display:none;">
		 				<input type="submit" value="保存"/>
		 			</div>
		 			<div class="clear"></div>
	 			</div>
		 		<div class="file_list_panel file_list_edit_panel" style="display:none;">
			 		<?php
			 			echo $form->textarea('CompPage.techadvant',array('style'=>'width:100%;height:300px;visibility:hidden;','name'=>'techadvant'));
			 		?>
		 		</div>
		 		<div class="file_list_panel">
		 			<?php echo $str->setinfo($form->value('CompPage.techadvant')); ?>
		 		</div>
		 	</div>
		 	<div class="category_file_block">
		 		<div class="category_title">
		 			<div class="left">专利成果</div>
		 			<div class="right title_drop_u_d">
		 				<a href="javascript:void(0);" onclick="drop_up_down(this)">编辑</a>
		 			</div>
		 			<div class="right users_form" style="display:none;">
		 				<input type="submit" value="保存"/>
		 			</div>
		 			<div class="clear"></div>
		 		</div>
		 		<div class="file_list_panel file_list_edit_panel" style="display:none;">
			 		<?php
			 			echo $form->textarea('CompPage.patent',array('style'=>'width:100%;height:300px;visibility:hidden;','name'=>'patent'));
			 		?>
		 		</div>
		 		<div class="file_list_panel">
		 			<?php echo $str->setinfo($form->value('CompPage.patent')); ?>
		 		</div>
		 	</div>
		 	<div class="category_file_block">
		 		<div class="category_title">
		 			<div class="left">人才培养</div>
		 			<div class="right title_drop_u_d">
		 				<a href="javascript:void(0);" onclick="drop_up_down(this)">编辑</a>
		 			</div>
		 			<div class="right users_form" style="display:none;">
		 				<input type="submit" value="保存"/>
		 			</div>
		 			<div class="clear"></div>
		 		</div>
		 		<div class="file_list_panel file_list_edit_panel" style="display:none;">
			 		<?php
			 			echo $form->textarea('CompPage.teachandstudy',array('style'=>'width:100%;height:300px;visibility:hidden;','name'=>'teachandstudy'));
			 		?>
		 		</div>
		 		<div class="file_list_panel">
		 			<?php echo $str->setinfo($form->value('CompPage.teachandstudy')); ?>
		 		</div>
		 	</div>
		 	<div class="category_file_block">
		 		<div class="category_title">
		 			<div class="left">企业对外宣传</div>
		 			<div class="right title_drop_u_d">
		 				<a href="javascript:void(0);" onclick="drop_up_down(this)">编辑</a>
		 			</div>
		 			<div class="right users_form" style="display:none;">
		 				<input type="submit" value="保存"/>
		 			</div>
		 			<div class="clear"></div>
		 		</div>
		 		<div class="file_list_panel file_list_edit_panel" style="display:none;">
		 			<div class="sel_def_title">
		 			<?php 
		 				$options = array('0'=>'是','1'=>'否');
						$attributes = array('legend'=>false,'default'=>'0');
						echo "是否公开：".$form->radio('CompPage.is_public',$options,$attributes);
		 			?>
			 		</div>
			 		<?php
			 			echo $form->textarea('CompPage.propaganda',array('style'=>'width:100%;height:300px;visibility:hidden;','name'=>'propaganda'));
			 		?>
		 		</div>
		 		<div class="file_list_panel">
		 			<?php echo $str->setinfo($form->value('CompPage.propaganda')); ?>
		 		</div>
		 	</div>
		 	<div class="category_file_block">
		 		<div class="category_title">
		 			<div class="left">
		 			<?php 
		 			$firsttitle=$form->value('CompPage.firsttitle');
		 			if(empty($firsttitle)){
		 				$firsttitle="自定义1" ;
		 			}
		 			echo $firsttitle;
		 			?>
		 			</div>
		 			<div class="right title_drop_u_d">
		 				<a href="javascript:void(0);" onclick="drop_up_down(this)">编辑</a>
		 			</div>
		 			<div class="right users_form" style="display:none;">
		 				<input type="submit" value="保存"/>
		 			</div>
		 			<div class="clear"></div>
		 		</div>
		 		<div class="file_list_panel file_list_edit_panel" style="display:none;">
			 		<div class="sel_def_title">
			 			<label>标题：</label><?php echo $form->text('CompPage.firsttitle'); ?>
			 		</div>
			 		<?php
			 			echo $form->textarea('CompPage.firstinfo',array('style'=>'width:100%;height:300px;visibility:hidden;','name'=>'firstinfo'));
			 		?>
		 		</div>
		 		<div class="file_list_panel">
		 			<?php echo $str->setinfo($form->value('CompPage.firstinfo')); ?>
		 		</div>
		 	</div>
		 	<div class="category_file_block">
		 		<div class="category_title">
		 			<div class="left">
					<?php 
		 			$secondtitle=$form->value('CompPage.secondtitle');
		 			if(empty($secondtitle)){
		 				$secondtitle="自定义2" ;
		 			}
		 			echo $secondtitle;
		 			?>
					</div>
		 			<div class="right title_drop_u_d">
		 				<a href="javascript:void(0);" onclick="drop_up_down(this)">编辑</a>
		 			</div>
		 			<div class="right users_form" style="display:none;">
		 				<input type="submit" value="保存"/>
		 			</div>
		 			<div class="clear"></div>
		 		</div>
		 		<div class="file_list_panel file_list_edit_panel" style="display:none;">
		 			<div class="sel_def_title">
			 			<label>标题：</label><?php echo $form->text('CompPage.secondtitle'); ?>
			 		</div>
			 		<?php
			 			echo $form->textarea('CompPage.secondinfo',array('style'=>'width:100%;height:300px;visibility:hidden;','name'=>'secondinfo'));
			 		?>
		 		</div>
		 		<div class="file_list_panel">
		 			<?php echo $str->setinfo($form->value('CompPage.secondinfo')); ?>
		 		</div>
		 	</div>
		 	<div class="category_file_block">
		 		<div class="category_title">
		 			<div class="left">
					<?php 
		 			$thirdtitle=$form->value('CompPage.thirdtitle');
		 			if(empty($thirdtitle)){
		 				$thirdtitle="自定义3" ;
		 			}
		 			echo $thirdtitle;
		 			?>
					</div>
		 			<div class="right title_drop_u_d">
		 				<a href="javascript:void(0);" onclick="drop_up_down(this)">编辑</a>
		 			</div>
		 			<div class="right users_form" style="display:none;">
		 				<input type="submit" value="保存"/>
		 			</div>
		 			<div class="clear"></div>
		 		</div>
		 		<div class="file_list_panel file_list_edit_panel" style="display:none;">
		 			<div class="sel_def_title">
			 			<label>标题：</label><?php echo $form->text('CompPage.thirdtitle'); ?>
			 		</div>
			 		<?php
			 			echo $form->textarea('CompPage.thirdinfo',array('style'=>'width:100%;height:300px;visibility:hidden;','name'=>'thirdinfo'));
			 		?>
		 		</div>
		 		<div class="file_list_panel">
		 			<?php echo $str->setinfo($form->value('CompPage.thirdinfo')); ?>
		 		</div>
		 	</div>
		 	<div class="category_file_block">
		 		<div class="category_title">
		 			<div class="left">
					<?php 
		 			$fourthtitle=$form->value('CompPage.fourthtitle');
		 			if(empty($fourthtitle)){
		 				$fourthtitle="自定义4" ;
		 			}
		 			echo $fourthtitle;
		 			?>
					</div>
		 			<div class="right title_drop_u_d">
		 				<a href="javascript:void(0);" onclick="drop_up_down(this)">编辑</a>
		 			</div>
		 			<div class="right users_form" style="display:none;">
		 				<input type="submit" value="保存"/>
		 			</div>
		 			<div class="clear"></div>
		 		</div>
		 		<div class="file_list_panel file_list_edit_panel" style="display:none;">
		 			<div class="sel_def_title">
			 			<label>标题：</label><?php echo $form->text('CompPage.fourthtitle'); ?>
			 		</div>
			 		<?php
			 			echo $form->textarea('CompPage.fourthinfo',array('style'=>'width:100%;height:300px;visibility:hidden;','name'=>'fourthinfo'));
			 		?>
		 		</div>
		 		<div class="file_list_panel">
		 			<?php echo $str->setinfo($form->value('CompPage.fourthinfo')); ?>
		 		</div>
			</div>
			
			-->
			<div class="clear"></div>
		</div>
		<div class="clear"></div>
    </div>
</div>
</form>